<!-- 新闻详情 -->
<template>
  <div class="detail">
    <Header />
    <div class="new_detail">
      <h3>{{ newsInfo.title }}</h3>
      <div class="new_inputtime">
        <span>{{ newsInfo.inputtime }}</span>
      </div>
      <div class="img">
        <img
          :src="'http://lds.vipkdj.com/public/uploads/' + newsInfo.thumb"
          alt=""
        />
      </div>
      <div v-html="newsInfo.content" class="text"></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      newsInfo: [],
    };
  },
  mounted() {
    let vm = this;
    vm.type = vm.$route.query.id;
    vm.getNewsInfo();
  },
  methods: {
    getNewsInfo() {
      let vm = this;

      let params = {
        art_id: vm.type,
      };
      vm.$post("/index/newsInfo", params).then((res) => {
        console.log(res);
        vm.newsInfo = res.data;
      });
    },
  },
};
</script>

<style lang="less" scoped>
.detail {
  .new_detail {
    h3 {
      font-family: Source Han Sans CN;
      font-size: 18px;
      font-style: normal;
      font-weight: 400;
      line-height: 27px;
      letter-spacing: 0em;
      text-align: left;
      color: #c4181f;
      margin: 44px 60px 0;
    }
    .new_inputtime {
      text-align: center;
      width: 341px;
      margin-left: 16px;
      margin-top: 12px;
      span {
        font-family: Source Han Sans CN;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 21px;
        letter-spacing: 0em;
        color: #a7a7a7;
        display: block;
      }
    }

    .img {
      margin-left: 53px;
      margin-top: 27px;
      img {
        width: 270px;
        height: 164px;
      }
    }
    .text {
      width: 341px;
      margin-left: 16px;
      margin-top: 34px;
      font-family: Source Han Sans CN;
      font-size: 14px;
      font-style: normal;
      font-weight: 400;
      line-height: 21px;
      letter-spacing: 0em;
      text-align: left;
      color: #333333;
    }
  }
}
</style>